package com.e.dianshang.service.impl;

import com.e.dianshang.mapper.OrderMapper;
import com.e.dianshang.mapper.StorageValueMapper;
import com.e.dianshang.pojo.Order;
import com.e.dianshang.pojo.StorageValue;
import com.e.dianshang.service.OrderService;
import com.e.dianshang.service.StorageValueService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Author Tian同學
 * @Date 2020/11/9 19:00
 * @Version 1.0
 */
@Service("storageValueService")
public class StorageValueServiceImpl implements StorageValueService {

    @Resource
    StorageValueMapper storageValueMapper;

    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.REQUIRED,rollbackFor = {Throwable.class})
    public int updateValue(Map storageValue) {
        return storageValueMapper.updateValue(storageValue);
    }
}
